package com.stud.common.core.annotation.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author Stud
 * @title XXXXX
 * @desription XXXXX
 * @data 2022-09-05 14:43
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Constraint(validatedBy = StudValidator.class)
public @interface StudValidate {

    /**
     * 不能重复的字段
     *
     * @return
     */
    String[] notRepeats() default {};

    /**
     * 默认错误提示信息
     *
     * @return
     */
    String message() default "校验失败";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
